import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { environment } from '@env/environment';
import { LayoutDefaultComponent } from '../layout/default/default.component';

const routes: Routes = [
  // 全局
  {
    path: '',
    redirectTo: 'indexkmn',
    pathMatch: 'full'
  },
  // 后台页面
  {
    path: '',
    component: LayoutDefaultComponent,
    children: [
      { path: 'main', loadChildren: () => import('./main/workplace/workplace.module').then(m => m.WorkplaceModule), data: { title: '工作台' } },
      { path: 'stream', loadChildren: () => import('./main/tempPages/stream.module').then(m => m.StreamModule), data: { title: '操作记录' } },
      { path: 'expertDiagnosisStatistics', loadChildren: () => import('./main/tempPages/expertDiagnosis.module').then(m => m.ExpertDiagnosisModule), data: { title: '专家诊断结果统计' } },
      { path: 'appserver', loadChildren: () => import('./main/server/appserver.module').then(m => m.AppserverModule), data: { title: '应用服务器' } },
      { path: 'articleManage/:category', loadChildren: () => import('./main/articleManege/articleManege.module').then(m => m.ArticleManegeModule), data: { title: '文章管理' } },
      { path: 'yearworkarea', loadChildren: () => import('./main/yearwork/yearworkarea.module').then(m => m.YearworkareaModule), data: { title: '工区年度计划' } },
      { path: 'yearworkshop', loadChildren: () => import('./main/yearwork/yearworkshop.module').then(m => m.YearworkshopModule), data: { title: '车间年度计划' } },
      { path: 'yearworkexam/:status', loadChildren: () => import('./main/yearwork/yearworkexam.module').then(m => m.YearworkexamModule), data: { title: '年表' } },
      { path: 'monthworkarea', loadChildren: () => import('./main/monthwork/monthworkarea.module').then(m => m.MonthworkareaModule), data: { title: '月度计划' } },
      { path: 'weekwork', loadChildren: () => import('./main/weekwork/weekwork.module').then(m => m.WeekworkModule), data: { title: '周计划编制' } },
      { path: 'statmonthplan', loadChildren: () => import('./main/statmonthplan/statmonthplan.module').then(m => m.StatmonthplanModule), data: { title: '月计划统计' } },
      { path: 'outstock', loadChildren: () => import('./main/material/outstock.module').then(m => m.OutstockModule), data: { title: '材料出库维护' } },
      { path: 'examine', loadChildren: () => import('./main/material/examine.module').then(m => m.ExamineModule), data: { title: '材料出库审批' } },
      { path: 'detectionProblems', loadChildren: () => import('./main/detectionProblems/detectionProblems.module').then(m => m.DetectionProblemsModule), data: { title: '集中监测问题统计' } },
      { path: 'constructionplan', loadChildren: () => import('./main/construction/construction.module').then(m => m.ConstructionModule), data: { title: '批复月度计划' } },
      { path: 'repairform', loadChildren: () => import('./main/repairForm/repairForm.module').then(m => m.RepairFormModule), data: { title: '高速铁路临时要点维修申请表' } },
      { path: 'reportrepair', loadChildren: () => import('./main/emergentRepair/emergentRepair.module').then(m => m.EmergentRepairModule), data: { title: '紧急修天窗汇报模板' } },
      { path: 'handover', loadChildren: () => import('./main/handover/handover.module').then(m => m.HandoverModule), data: { title: '日交班信息' } },
      { path: 'alarmanagement', loadChildren: () => import('./main/alarmanagement/alarmanagement.module').then(m => m.AlarmanagementModule), data: { title: '报警管理' } },
      { path: 'examconstructionplan/:status', loadChildren: () => import('./main/examconstructionplan/examconstructionplan.module').then(m => m.ExamconstructionplanModule), data: { title: '调度导入日维修维护' } },
      { path: 'examconstructionplan_sg/:status', loadChildren: () => import('./main/examconstructionplan/examconstructionplan_sg.module').then(m => m.ExamconstructionplanSgModule), data: { title: '施工计划导入' } },
      { path: 'workorderpreparation/:status', loadChildren: () => import('./main/workorderpreparation/workorderpreparation.module').then(m => m.WorkorderpreparationModule), data: { title: '派工单编制' } },
      { path: 'workorderpreparation_sg/:status', loadChildren: () => import('./main/workorderpreparation/workorderpreparation_sg.module').then(m => m.WorkorderpreparationsgModule), data: { title: '派工单编制' } },
      { path: 'pgdwcqk', loadChildren: () => import('./main/jhwcqk/jhwcqk.module').then(m => m.JhwcqkModule), data: { title: '派工单完成情况', type: 'pgdwcqk' } },
      { path: 'sgpgdwcqk', loadChildren: () => import('./main/jhwcqk/jhwcqk.module').then(m => m.JhwcqkModule), data: { title: '派工单完成情况', type: 'sgpgdwcqk' } },
      { path: 'lssd', loadChildren: () => import('./main/lssd/lssd.module').then(m => m.LssdModule), data: { title: '临时上道', type: 'sgpgdwcqk' } },
      { path: 'sxdgl', loadChildren: () => import('./main/gjqdgl/sxdgl/sxdgl.module').then(m => m.SxdglModule), data: { title: '上下道管理' } },
      { path: 'kkbj', loadChildren: () => import('./main/gjqdgl/kkbj/kkbj.module').then(m => m.KkbjModule), data: { title: '卡控报警' } },
      { path: 'gjlb', loadChildren: () => import('./main/gjqdgl/gjlb/gjlb.module').then(m => m.GjlbModule), data: { title: '工具类别' } },
      { path: 'gjzl', loadChildren: () => import('./main/gjqdgl/gjzl/gjzl.module').then(m => m.GjzlModule), data: { title: '工具种类' } },
      { path: 'gjtj', loadChildren: () => import('./main/gjqdgl/gjtj/gjtj.module').then(m => m.GjtjModule), data: { title: '工具统计' } },
      { path: 'zymgl/:status', loadChildren: () => import('./main/zymgl/zymgl.module').then(m => m.ZymglModule), data: { title: '作业门维护' } },
      { path: 'dbwtzz', loadChildren: () => import('./main/dbwtzz/dbwtzz.module').then(m => m.DbwtzzModule), data: { title: '重点信息追踪' } },
      { path: 'tctj', loadChildren: () => import('./main/tctj/tctj.module').then(m => m.TctjModule), data: { title: '天窗统计' } },
      { path: 'jzjc', loadChildren: () => import('./main/jzjc/jzjc.module').then(m => m.JzjcModule), data: { title: '集中监测' } },
      { path: 'zhpd', loadChildren: () => import('./main/zhpd/zhpd.module').then(m => m.ZhpdModule), data: { title: '设备健康分析' } },
      { path: 'jcwttj', loadChildren: () => import('./main/jcwttj/jcwttj.module').then(m => m.JcwttjModule), data: { title: '监测问题统计' } },
      { path: 'zhpdsz', loadChildren: () => import('./main/zhpdsz/zhpdsz.module').then(m => m.ZhpdszModule), data: { title: '健康评分设置' } },
      { path: 'sxdaqkk', loadChildren: () => import('./main/sxdaqkk/sxdaqkk.module').then(m => m.SxdaqkkModule), data: { title: '上下道安全卡控' } },
      { path: 'safeHiddenDanger', loadChildren: () => import('./main/safeHiddenDanger/safeHiddenDanger.module').then(m => m.SafeHiddenDangerModule), data: { title: '安全隐患库' } },
      { path: 'dangerStatistics', loadChildren: () => import('./main/dangerStatistics/dangerStatistics.module').then(m => m.DangerStatisticsModule), data: { title: '隐患库统计' } },
      { path: 'weekPlanWorkshop', loadChildren: () => import('./main/weekPlanWorkshop/weekPlanWorkshop.module').then(m => m.WeekPlanWorkshopModule), data: { title: '车间周计划' } },
      { path: 'manufactorSkill', loadChildren: () => import('./main/manufactorSkill/manufactorSkill.module').then(m => m.ManufactorSkillModule), data: { title: '厂家技术' } },
      { path: 'technicalSupport', loadChildren: () => import('./main/technicalSupport/technicalSupport.module').then(m => m.TechnicalSupportModule), data: { title: '专家库人员' } },
      { path: 'tectonicSynthesis', loadChildren: () => import('./main/tectonicSynthesis/tectonicSynthesis.module').then(m => m.TectonicSynthesisModule), data: { title: '综合分析' } },
      { path: 'securityProblem/:status', loadChildren: () => import('./main/securityProblem/securityProblem.module').then(m => m.SecurityProblemModule), data: { title: '安全问题库' } },
      { path: 'signalProblem/:status', loadChildren: () => import('./main/signalProblem/signalProblem.module').then(m => m.SignalProblemModule), data: { title: '信号设备问题库' } },
      { path: 'problemStatistics', loadChildren: () => import('./main/problemStatistics/problemStatistics.module').then(m => m.ProblemSPtatisticsModule), data: { title: '问题库统计' } },
      { path: 'reportForm', loadChildren: () => import('./main/reportForm/reportForm.module').then(m => m.ReportFormModule), data: { title: '速报表' } },
      { path: 'workAreaWeave', loadChildren: () => import('./main/workAreaWeave/workAreaWeave.module').then(m => m.WorkAreaWeaveModule), data: { title: '维修周计划' } },
      { path: 'dailySchedule', loadChildren: () => import('./main/dailySchedule/dailySchedule.module').then(m => m.DailyScheduleModule), data: { title: '维修日计划' } },
      { path: 'dispatchList', loadChildren: () => import('./main/dispatchList/dispatchList.module').then(m => m.DispatchListModule), data: { title: '作业工单' } },
      { path: 'petitionView', loadChildren: () => import('./main/petitionView/petitionView.module').then(m => m.PetitionViewModule), data: { title: '信访查看' } },
      { path: 'cableRoute', loadChildren: () => import('./main/cableRoute/cableRoute.module').then(m => m.CableRouteModule), data: { title: '电缆径路' } },
      { path: 'controldetectalarm_menu/:showHeader/:showTable/:showChart', loadChildren: () => import('./main/control/detectalarm.module').then(m => m.ControlDetectalarmModule), data: { title: '检测报警查询' } },
      { path: 'remotepage/:id', loadChildren: () => import('./main/tempPages/remotepage.module').then(m => m.RemotepageModule) },
      // 自动生成的页面
      { path: 'build/jcwtzg/:status', loadChildren: () => import('./build/jcwtzg/jcwtzg.module').then(m => m.JcwtzgModule), data: { title: '监测问题整改' } },
      { path: 'build/sparepartsStatistics/:status', loadChildren: () => import('./build/sparepartsStatistics/sparepartsStatistics.module').then(m => m.SparepartsStatisticsModule), data: { title: '备品管理' } },
      { path: 'build/emerEqpTemplate/:status', loadChildren: () => import('./build/emerEqpTemplate/emerEqpTemplate.module').then(m => m.EmerEqpTemplateModule), data: { title: '登销记模板' } },
      { path: 'build/emerProcedure/:status', loadChildren: () => import('./build/emerProcedure/emerProcedure.module').then(m => m.EmerProcedureModule), data: { title: '标准化应急处置流程' } },
      { path: 'build/emPersoninfo/:status', loadChildren: () => import('./build/emPersoninfo/emPersoninfo.module').then(m => m.EmPersoninfoModule), data: { title: '应急人员' } },
      { path: 'build/ymTMonthimpdKmn/:status', loadChildren: () => import('./build/ymTMonthimpdKmn/ymTMonthimpdKmn.module').then(m => m.YmTMonthimpdKmnModule), data: { title: '月度重点工作明细' } },
      { path: 'build/ymTMonthimpworkMKmn/:status', loadChildren: () => import('./build/ymTMonthimpworkMKmn/ymTMonthimpworkMKmn.module').then(m => m.YmTMonthimpworkMKmnModule), data: { title: '月重点工作编制' } },
      { path: 'build/ymTMonthimpworkMKmnLd/:status', loadChildren: () => import('./build/ymTMonthimpworkMKmnLd/ymTMonthimpworkMKmnLd.module').then(m => m.YmTMonthimpworkMKmnLdModule), data: { title: '月重点工作领导审批' } },
      { path: 'build/ymTMonthimpworkMKmnRd/:status', loadChildren: () => import('./build/ymTMonthimpworkMKmnRd/ymTMonthimpworkMKmnRd.module').then(m => m.YmTMonthimpworkMKmnRdModule), data: { title: '月重点工作查看' } },
      { path: 'build/ymTMonthimpDKmnQs/:status', loadChildren: () => import('./build/ymTMonthimpdKmnQs/ymTMonthimpdKmnQs.module').then(m => m.YmTMonthimpdKmnQsModule), data: { title: '月重点工作处理' } },
      { path: 'build/ymTDayworkreport/:status', loadChildren: () => import('./build/ymTDayworkreport/ymTDayworkreport.module').then(m => m.YmTDayworkreportModule), data: { title: '综合日报表' } },
      { path: 'build/dwjhtb/:status', loadChildren: () => import('./build/dwjhtb/dwjhtb.module').then(m => m.DwjhtbModule), data: { title: '点外计划提报' } },
      { path: 'build/dwjh', loadChildren: () => import('./build/dwjh/dwjh.module').then(m => m.DwjhModule), data: { title: '点外计划' } },
      { path: 'build/zhrb/:status', loadChildren: () => import('./build/zhrb/zhrb.module').then(m => m.ZhrbModule), data: { title: '综合日报' } },
      { path: 'build/personDuty/:status', loadChildren: () => import('./build/personDuty/personDuty.module').then(m => m.PersonDutyModule), data: { title: '值班人员' } }
    ]
  },
  // 单页面
  { path: 'passport/login', loadChildren: () => import('./main/login/login.module').then(m => m.LoginModule), data: { title: '登录', titleI18n: '登录' } },
  { path: 'indexkmn', loadChildren: () => import('./main/index/index.module').then(m => m.IndexKmnModule), data: { title: '办公网首页' } },
  { path: 'control', loadChildren: () => import('./main/control/control.module').then(m => m.ControlModule), data: { title: '调度指挥中心' } },
  { path: 'control/detail', loadChildren: () => import('./main/control/detail.module').then(m => m.ControlDetailModule), data: { title: '应急处置' } },
  { path: 'control/command', loadChildren: () => import('./main/control/command.module').then(m => m.ControlCommandModule), data: { title: '应急指挥' } },
  { path: 'control/statdata', loadChildren: () => import('./main/control/statdata.module').then(m => m.ControlStatdataModule), data: { title: '综合分析' } },
  { path: 'control/diagnose', loadChildren: () => import('./main/control/diagnose.module').then(m => m.ControlDiagnoseModule), data: { title: '智能诊断' } },
  { path: 'control/detectalarm', loadChildren: () => import('./main/control/detectalarm.module').then(m => m.ControlDetectalarmModule), data: { title: '检测报警查询' } },
  { path: 'IAS', loadChildren: () => import('./main/intelligenceAnalysis/intelligenceAnalysis.module').then(m => m.IntelligenceAnalysisModule), data: { title: '智能分析系统' } },
  { path: 'IDS', loadChildren: () => import('./main/intelligentDiagnosis/intelligentDiagnosis.module').then(m => m.IntelligentDiagnosisModule), data: { title: '智能诊断' } },
  { path: 'handoverRd', loadChildren: () => import('./main/handover/handover.readonly.module').then(m => m.HandoverReadonlyModule), data: { title: '交班日报' } },
  { path: 'onlineComplaint', loadChildren: () => import('./main/onlineComplaint/onlineComplaint.module').then(m => m.OnlineComplaintModule), data: { title: '在线举报' } },
  { path: 'xtbg', loadChildren: () => import('./main/xtbg/xtbg.module').then(m => m.XtbgModule), data: { title: '协同办公' } },
  { path: 'exception/404', loadChildren: () => import('./main/tempPages/404.module').then(m => m.Exception404Module), data: { title: '页面未找到' } },
  { path: '**', redirectTo: 'exception/404' }
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })],
  exports: [RouterModule]
})
export class RouteRoutingModule { }
